package com.webshop.domain;

import com.webshop.Dao.PageDao;
import com.webshop.Dao.ProductDao;

import javax.swing.text.html.HTMLDocument;
import java.util.Iterator;
import java.util.List;

public class Cart {
    int id;
    int num;
    Items items;



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
        items = ProductDao.getItem(id);
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "Cart{" +
                "id=" + id +
                ", num=" + num +
                '}';
    }

    public void setItems(Items items) {
        this.items = items;
    }

    public Items getItems() {
        return items;
    }

    public Cart(int id, int num) {
        this.id = id;
        this.num = num;
        items = ProductDao.getItem(id);
    }

    public Cart() {
    }




}
